Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make platform of image explicit #57

Closed
wants to merge 1 commit into from

Conversation

Ivan-Velickovic
Copy link
Contributor

Specify that the Docker image to be built and run is x86_64 Linux. This is required for non-x86 hosts such as Apple Silicon computers.

Signed-off-by: Ivan Velickovic [email protected]

@Ivan-Velickovic Ivan-Velickovic force-pushed the non_x86_support branch 2 times, most recently from cf0946f to b8ddc92 Compare October 7, 2022 10:24
This is required for non-x86 hosts

Signed-off-by: Ivan-Velickovic <[email protected]>
@axel-h
Copy link
Member

axel-h commented Oct 7, 2022

Seem ok to me, does not harm on x86 and appears to help Mac users then. Is this just for building or are you also running x86 containers there via an emulation layer?

@Ivan-Velickovic
Copy link
Contributor Author

This is what I needed to get the Docker container building & running on an M1 (specifically to run seL4test and other seL4 projects), I'm not using Rosetta. I believe by default if the platform isn't specified Docker will try grab an ARM64 image, which we don't currently support.

@lsf37
Copy link
Member

lsf37 commented Oct 7, 2022

Fixing the platform to amd64 will mean the image runs under emulation on the M1 (not Rosetta, but whatever docker uses to simulate amd64, I believe it's qemu). For what I've tried so far, this seemed to be working fine and with reasonable performance.

It might also be possible to build a native arm64 image, but that would be a more invasive change (e.g. would need all toolchains etc in arm64 versions). For now I think emulation is fine.

@lsf37
Copy link
Member

lsf37 commented Oct 7, 2022

@Ivan-Velickovic the build test is now passing. Did you still have issues with Haskell stack in the container?

@Ivan-Velickovic
Copy link
Contributor Author

@Ivan-Velickovic the build test is now passing. Did you still have issues with Haskell stack in the container?

Yes. For context, trying to invoke stack causes the Linux kernel to kill the process as the system runs out of memory (with 4GiB of memory for the container). Increasing this to 6GiB at least allowed me to successfully do stack --version, however, attempting to build an seL4 project that uses CapDL still failed.

So the main caveat with this PR is that not all seL4 projects will build on M1. I suspect something is going wrong with QEMU's x86_64 -> AArch64 emulation, not sure.

@Ivan-Velickovic
Copy link
Contributor Author

Superseded by #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants